package com.ruoyi.Healthgoals.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.Healthgoals.mapper.HealthGoalsMapper;
import com.ruoyi.Healthgoals.domain.HealthGoals;
import com.ruoyi.Healthgoals.service.IHealthGoalsService;

/**
 * 用户目标Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-03
 */
@Service
public class HealthGoalsServiceImpl implements IHealthGoalsService 
{
    @Autowired
    private HealthGoalsMapper healthGoalsMapper;

    /**
     * 查询用户目标
     * 
     * @param goalId 用户目标主键
     * @return 用户目标
     */
    @Override
    public HealthGoals selectHealthGoalsByGoalId(Long goalId)
    {
        return healthGoalsMapper.selectHealthGoalsByGoalId(goalId);
    }

    /**
     * 查询用户目标列表
     * 
     * @param healthGoals 用户目标
     * @return 用户目标
     */
    @Override
    public List<HealthGoals> selectHealthGoalsList(HealthGoals healthGoals)
    {
        return healthGoalsMapper.selectHealthGoalsList(healthGoals);
    }

    /**
     * 新增用户目标
     * 
     * @param healthGoals 用户目标
     * @return 结果
     */
    @Override
    public int insertHealthGoals(HealthGoals healthGoals)
    {
        return healthGoalsMapper.insertHealthGoals(healthGoals);
    }

    /**
     * 修改用户目标
     * 
     * @param healthGoals 用户目标
     * @return 结果
     */
    @Override
    public int updateHealthGoals(HealthGoals healthGoals)
    {
        return healthGoalsMapper.updateHealthGoals(healthGoals);
    }

    /**
     * 批量删除用户目标
     * 
     * @param goalIds 需要删除的用户目标主键
     * @return 结果
     */
    @Override
    public int deleteHealthGoalsByGoalIds(Long[] goalIds)
    {
        return healthGoalsMapper.deleteHealthGoalsByGoalIds(goalIds);
    }

    /**
     * 删除用户目标信息
     * 
     * @param goalId 用户目标主键
     * @return 结果
     */
    @Override
    public int deleteHealthGoalsByGoalId(Long goalId)
    {
        return healthGoalsMapper.deleteHealthGoalsByGoalId(goalId);
    }
}
